package servlet;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.PrintWriter;

/**
 * @author MissChen
 * @date 2024年04月23日 16:29
 */
@WebServlet("*.test")
public class TestTwoServlet extends HttpServlet {
    @Override
    protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        response.setContentType("text/html;charset=utf-8");
        PrintWriter out = response.getWriter();
        String servletPath = request.getServletPath();
        System.out.println(servletPath);

        out.println("<h1 style='color:green;'>hello,i am  coming</h1>");
    }
}
